package com.java.grammer;

public class ForTest_7_rhombus {
    public static void main(String[] args) {
        int hang = 7;
        for (int i = 1; i <= hang / 2 + 1; i++) {//打印上边的菱形
            {
                for (int j = 1; j <= (hang - (2 * i - 1)) / 2; j++)

                    System.out.print("");
                for (int k = 1; k <= 2 * i - 1; k++) {
                    if (k % 2 != 0)
                        System.out.print("*");
                    else
                        System.out.print("");
                }

                System.out.println();
            }
            for (i = 1; i <= hang / 2; i++) {
                for (int j = 1; j <= i; j++)
                    System.out.print("");
                for (int k = 1; k < hang - i * 2; k++) {
                    if (k % 2 != 0)
                        System.out.print("*");
                    else
                        System.out.print("");
                }

                System.out.println();
            }
        }
    }
}
	
		